/*  1:   */ package org.intellij.images.actions;
/*  2:   */ 
/*  3:   */

import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.ToggleAction;
import org.intellij.images.ui.ImageComponentDecorator;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */ 
/*  9:   */ public final class ToggleTransparencyChessboardAction
/* 10:   */   extends ToggleAction
/* 11:   */ {
/* 12:   */   public boolean isSelected(AnActionEvent paramAnActionEvent)
/* 13:   */   {
/* 14:30 */     ImageComponentDecorator localImageComponentDecorator = (ImageComponentDecorator)ImageComponentDecorator.DATA_KEY.getData(paramAnActionEvent.getDataContext());
/* 15:31 */     return (localImageComponentDecorator != null) && (localImageComponentDecorator.isEnabledForActionPlace(paramAnActionEvent.getPlace())) && (localImageComponentDecorator.isTransparencyChessboardVisible());
/* 16:   */   }
/* 17:   */   
/* 18:   */   public void setSelected(AnActionEvent paramAnActionEvent, boolean paramBoolean)
/* 19:   */   {
/* 20:35 */     ImageComponentDecorator localImageComponentDecorator = (ImageComponentDecorator)ImageComponentDecorator.DATA_KEY.getData(paramAnActionEvent.getDataContext());
/* 21:36 */     if ((localImageComponentDecorator != null) && (localImageComponentDecorator.isEnabledForActionPlace(paramAnActionEvent.getPlace()))) {
/* 22:37 */       localImageComponentDecorator.setTransparencyChessboardVisible(paramBoolean);
/* 23:   */     }
/* 24:   */   }
/* 25:   */   
/* 26:   */   public void update(AnActionEvent paramAnActionEvent)
/* 27:   */   {
/* 28:42 */     super.update(paramAnActionEvent);
/* 29:43 */     ImageComponentDecorator localImageComponentDecorator = (ImageComponentDecorator)ImageComponentDecorator.DATA_KEY.getData(paramAnActionEvent.getDataContext());
/* 30:44 */     paramAnActionEvent.getPresentation().setEnabled((localImageComponentDecorator != null) && (localImageComponentDecorator.isEnabledForActionPlace(paramAnActionEvent.getPlace())));
/* 31:45 */     paramAnActionEvent.getPresentation().setText(isSelected(paramAnActionEvent) ? "Hide Chessboard" : "Show Chessboard");
/* 32:   */   }
/* 33:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.intellij.images.actions.ToggleTransparencyChessboardAction

 * JD-Core Version:    0.7.0.1

 */